Don't warn when same cons is added to alist twice
authorjustbur <justin@burkett.cc>
Thu, 22 Oct 2015 13:59:36 +0000 (09:59 -0400)
committerjustbur <justin@burkett.cc>
Thu, 22 Oct 2015 13:59:36 +0000 (09:59 -0400)
which-key.el

index 81f6b272f7a3081d7244e2a903c5871ab2df0d88..2e2c03b010cec4490c1c6ccc9f4805ba7e920b7e 100644 (file)
@@ -542,9 +542,10 @@ bottom."
   (let ((key-lst (listify-key-sequence (kbd key))))
     (cond ((null alist) (list (cons key-lst value)))
           ((assoc key-lst alist)
-           (message "which-key: changing %s name from %s to %s in the %s alist"
-                    key (cdr (assoc key-lst alist)) value alist-name)
-           (setcdr (assoc key-lst alist) value)
+           (when (not (string-equal (cdr (assoc key-lst alist)) value))
+             (message "which-key: changing %s name from %s to %s in the %s alist"
+                      key (cdr (assoc key-lst alist)) value alist-name)
+             (setcdr (assoc key-lst alist) value))
            alist)
           (t (cons (cons key-lst value) alist)))))